<template>
  <span>
    <el-button round size="mini" @click="dialogEmailMethods">绑定</el-button>
    <!-- 邮箱验证弹出框 -->
    <el-dialog title="邮箱" :visible.sync="dialogEmail" center>
      <div slot="title" class="header-title">
        <img src="../assets/pic@2x/youxiang@2x.png" alt>
        <div style="font-weight:300;color:rgba(0,0,0)">邮箱绑定</div>
      </div>
      <el-form :model="form">
        <el-form-item label="邮箱地址" :label-width="formLabelWidth">
          <el-input v-model="form.name" autocomplete="off" placeholder="请输入邮箱地址"></el-input>
        </el-form-item>
        <el-form-item label="邮箱验证码" :label-width="formLabelWidth">
          <el-input
            v-model="form.name"
            autocomplete="off"
            placeholder="请输入手机验证码"
            :class="{phoneCheck:true}"
          ></el-input>
          <el-button :class="{getCheck:true}">获取验证码</el-button>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer" style="height:100px;">
        <el-button
          type="primary"
          @click="dialogEmailMethods"
          style="float:none;width:40%;margin-right:0;"
        >确 定 修 改</el-button>
      </div>
    </el-dialog>
  </span>
</template>
<script>
export default {
  data() {
    return {
      dialogEmail: false,
      form: {
        name: ""
      },
      formLabelWidth: "120px"
    };
  },
  methods: {
    dialogEmailMethods() {
      this.dialogEmail = !this.dialogEmail;
       if (this.dialogEmail == true) {
        console.log("打开邮箱弹出框触发的事件");
      } else {
        console.log("关闭邮箱弹出框触发的事件");
      }
    }
  }
};
</script>
<style lang="less" scoped>
.el-button {
  float: right;
  margin: 20px 30px 0 0;
  background: #171c61;
  color: #fff;
}
.phoneCheck {
  width: 70%;
}
.getCheck {
  width: 30%;
  position: absolute;
  margin: 0;
  float: none;
  background: rgba(238, 238, 238, 1);
  color: #171c61;
}
</style>

